package org.example.netty.test.nio.netty.chat.bean;

import lombok.Data;
import org.example.netty.test.nio.netty.chat.common.MessageType;

import java.util.UUID;

/**
 * @author zp
 * @version 1.0
 * @description: 加入单聊的消息
 * @date 2023/4/4 19:34
 */
@Data
public class JoinUserMessage extends AbsMessageBase{
    private String createBuildUserName;
    private String byUserName;
    private String chatId;
    @Override
    public int getMessageType() {
        return MessageType.MESSAGE_TYPE_JOIN_USER;
    }

    public JoinUserMessage(){

    }

    public JoinUserMessage(String createBuildUserName,String byUserName){
        this.createBuildUserName = createBuildUserName;
        this.byUserName = byUserName;
        this.chatId = UUID.randomUUID().toString().replaceAll("-","");
    }
}
